package com.arajuuri.catinvaders;

import java.io.Serializable;


/**
 * <p>Title: Cat Invaders</p>
 * <p>Description: A space invaders clone with cats</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author Semi Arajuuri
 * @version 1.0
 */

public class HighScoreRow implements Comparable, Serializable{
  private String name="";
  private int points=0;

  public HighScoreRow() {
  }

  public HighScoreRow(String name, int points){
    this.name=name;
    this.points=points;
  }

  public String getName(){
    return name;
  }

  public int getPoints(){
    return points;
  }
  public int compareTo(Object obj){
    int x=0;
    if(obj instanceof HighScoreRow){
      HighScoreRow hsrow=(HighScoreRow)obj;
      x=hsrow.getPoints()-this.getPoints();
    }
    return x;
  }

}
